<h1>Listing cards</h1>

<table>
  <tr>
    <th>Black</th>
    <th>Text</th>
    <th>Deck</th>
    <th></th>
    <th></th>
    <th></th>
  </tr>

<% @cards.each do |card| %>
  <tr>
    <td><%= card.black %></td>
    <td><%= card.text %></td>
    <td><%= card.deck_id %></td>
    <td><%= link_to 'Show', card %></td>
    <td><%= link_to 'Edit', edit_card_path(card) %></td>
    <td><%= link_to 'Destroy', card, method: :delete, data: { confirm: 'Are you sure?' } %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to 'New Card', new_card_path %>
